package com.hitqz.robot.biz.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hitqz.robot.api.business.dto.cvd.CvdSafeExcelDto;
import com.hitqz.robot.api.business.entity.PatrolResultEntity;
import com.hitqz.robot.api.business.params.QueryPatrolDetailNewParams;
import com.hitqz.robot.api.business.params.QueryPatrolSummaryNewParams;
import com.hitqz.robot.api.business.params.QueryPatrolSummaryParams;
import com.hitqz.robot.api.business.vo.PatrolResultNewVo;
import com.hitqz.robot.api.business.vo.PatrolResultSummaryNewVo;
import com.hitqz.robot.api.business.vo.PatrolResultSummaryVo;

import java.util.*;

/**
 * @author wengyx
 * @date 2024/8/7
 */
public interface PatrolResultService extends IService<PatrolResultEntity> {

    Page<PatrolResultSummaryVo> summaryPage(Page<PatrolResultSummaryVo> page, QueryPatrolSummaryParams query);
    PatrolResultSummaryVo summary(QueryPatrolSummaryParams query);

    // 方法1：构建设备树
    public List<Tree<String>> buildDeviceTree(String searchName) ;

    // 方法2：获取设备下的检查项
    public List<String> getDeviceItems(String robotSn, String devPath);

    // 方法3：查询检查项数据
    public List<PatrolResultEntity> getItemValues(
            String robotSn,
            String devName,
            String itemName,
            Date startTime,
            Date endTime) ;

    Page<PatrolResultSummaryNewVo> cvdSummaryPage(QueryPatrolSummaryNewParams query);

    Page<PatrolResultNewVo> cvdDetailPage(QueryPatrolDetailNewParams query);

    List<CvdSafeExcelDto> getCvdSafeEventList(String execNo);

    List<Object> getCvdPatrolList(String execNo);

    List<List<String>> headForPatrol(String execNo);
}
